package com.fjec.common.shiro.feign;

import com.fjec.common.shiro.feign.config.FeignConfig;
import com.fjec.common.shiro.feign.fallback.PermissionServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "user-serv", fallback = PermissionServiceFallback.class, configuration = FeignConfig.class)
public interface PermissionService {
    @RequestMapping(method = RequestMethod.GET, value = "/n/permission/getPermsByRoleCode")
    List<String> getPermissions(@RequestParam("roleCode") String roleCode);
}
